package by.grsu.shakh.page.librarian;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.SubmitLink;
import org.apache.wicket.markup.html.link.Link;

import by.grsu.shakh.entity.User;
/**
 * librarian page
 * 
 * @author shakh_andrew
 */
public class LibrarianPage extends WebPage {
	@SuppressWarnings({ "unchecked", "serial" })
	public LibrarianPage(User user) {
		super();
		final Form form = new Form("form");
		add(form);

		form.add(new Label("login", user.getLogin()));

		form.add(new SubmitLink("user") {
			@Override
			public void onSubmit() {
				setResponsePage(new ListUserPage());
			}
		});

		form.add(new Link("book") {
			@Override
			public void onClick() {
				setResponsePage(new ListBookPage());

			}
		});
		form.add(new Link("catalog") {
			@Override
			public void onClick() {
				setResponsePage(new ListCatalogPage());
			}
		});

	}
}
